<template>
    <dv-border-box7 :color="['#0D3568', '#49ACD6']" backgroundColor="" style="margin-top: 15px;">
        <div class="platewrapper">
            <headline title="重点人员分析" />
            <div class="cont-wrapper">
                <div style="height: 258px;">
                    <BasicTable @register="registerTable" />
                </div>
            </div>
        </div>
    </dv-border-box7>
</template>

<script setup lang="ts">
import { BasicTable, useTable } from '@/components/table';
import type { BasicColumn } from '@/components/table';

const columns:BasicColumn[] = [
    { title: '姓名', dataIndex: 'name' },
    { title: '类型', dataIndex: 'typeStr'},
    { title: '地址', dataIndex: 'adress', align: 'left', ellipsis: true, width: 160 },
];

// 页面表格属性配置
const [registerTable, { setTableData }] = useTable({
    columns, // 表格渲染参数配置
    immediate: false, // 是否立即执行
    canResize: true, // 是否显示滚动条
    ellipsis: true, // 文本超过宽度是否显示...
    isCanResizeParent: true, // 是否继承父级高度
    showIndexColumn: false, // 是否显示序号列
    pagination: false,
});

onMounted(() => {
    setTableData([
       { name: '张三', typeStr: '残疾人', adress: '12栋B4单元-505' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
       { name: '李文娜', typeStr: '五保人员', adress: '12栋B4单元-506' },
    ]);
});
</script>